#include "mapNode.h"


mapNode::mapNode(void)
{
	x = 0;
	y = 0;
	gScore = hScore = fScore = 0;
	parent = 0;
}

mapNode::mapNode(int in_x, int in_y)
{
	x = in_x;
	y = in_y;
	gScore = hScore = fScore = 0;
	parent = 0;
}


mapNode::~mapNode(void)
{
}

// Current A* Heuristic strategy: direct distance between nodes
float mapNode::heuristic(mapNode * goalNode, float modifier) {
	return sqrt(pow((float)goalNode->x - x,2) + pow((float)goalNode->y -y,2)) * modifier;
}

bool mapNode::operator== (mapNode inNode) {
	return (x == inNode.x && y == inNode.y);
}